package com.base.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import jodd.datetime.JDateTime;

@Component
public class DemoTask {

	@Scheduled(cron="0/5 * *  * * ? ")   //每5秒执行一次 
	public void hello() {
		System.out.println(new JDateTime().toString("YYYY-MM-DD hh:mm:ss") + "   hello world!!!");
	}
	
	public void test() {
		System.out.println(new JDateTime().toString("YYYY-MM-DD hh:mm:ss") + "   test!!!");
	}
	
}
